________________________________________
Process Properties
A process in a multi-threaded system is the changeable entity. It must be considered as an execution frame. It has all traditional process attributes, such as:
- Process ID, process group ID, user ID, and group ID
- Environment
- Working directory.
A process also provides a common address space and common system resources:
- File descriptors
- Signal actions
- Shared libraries
- Inter-process communication tools (such as message queues, pipes, semaphores, or shared memory).
Thread Properties
A thread is the schedulable entity. It has only those properties that are required to ensure its independent flow of control. These include the following properties:
- Stack
- Scheduling properties (such as policy or priority)
- Set of pending and blocked signals
- Some thread-specific data.
Modern Operating systems( Mach,Chorus,NT,Modern UNIX) separate the concept of thread and process.
- The thread defines a sequential execution stream within a process( PC,SP,Registers).
- The process defines the address space and general process attributes ( everything but the thread of execution).
- A thread is bound to a single process. However, processes, can have multiple threads.
- Threads become the unit os scheduling. Processes are now the containers in which threads execute.Process become static entities while, threads are dynamic entities.
.
Separating threads and processes makes it easier to support multi threaded applications. Creating concurrency does not require creating new process. Concurrency can be very useful for improving program structure, handling concurrent events and writing parallel programs. So, multithreading is even useful on a uniprocessor